<?php 
/**
 *  Por Federico Pisarello - SisDev Software (c) 2012 - Buenos Aires, Argentina.
 * 	fpisarello@sisdevsoft.com
 */

require("includes/constants.php");

session_start();
if(!isset($_SESSION['userName']))
	exit();
?>

<!-- File Upload Files -->
<link href="css/fileuploader.css" rel="stylesheet" type="text/css">
<script src="js/fileuploader.js" type="text/javascript"></script>

<!-- Script User Form -->
<script src="js/carreras.js" type="text/javascript"></script>
<script src="js/carrerasItems.js" type="text/javascript"></script>

<div id="main">
	<div id="contenidoInterno">
		<?php if($_SESSION['userType'] == $idTypeDataEntry) { ?>
			<button class="itmIngBtn" id="btnAddResult">Ingresar Resultados</button>
		<?php } else {?>
			<button class="itmIngBtn" id="btnAdd" >Ingresar Carrera</button>
			<button class="itmIngBtn" id="btnEdit" >Editar Carrera</button>
			<button class="itmIngBtn" id="btnErase">Eliminar Carrera</button>
			<button class="itmIngBtn" id="btnAddResult">Ingresar Resultados</button>
			<button class="itmIngBtn" id="btnViewCalcPuntos">Calcular Puntos</button>
		<?php } ?>
		<table id="dt_carreras" class="display">
			<thead>
				<tr>
					<th>Id</th>
					<th>Carrera</th>
					<th>Fecha</th>
					<th>Hora Inicio</th>
					<th>Hora Cierre</th>
					<th>Publicar Resultados</th>
				</tr>
		    </thead>
		    <tbody>
		    	<td colspan="6" class="dataTables_empty">Cargando Datos...</td>
			</tbody>
		</table>
	</div>
</div>

<!-- PopUp Team Dialog -->
<div id="carrerasDialog"></div>
<div id="carrerasDialogPuntos"></div>
<div id="carrerasDialogTablas"></div>

<!-- PopUp Delete Team Dialog -->
<div id="deleteCarrerasDialog" style="display: none;">
	<div id="tituloPopUp">Realmente desea eliminar este registro?</div>	
	<button class="itmIngBtn" id="btnConfirmDelete">S&iacute;</button>
	<button class="itmIngBtn" id="btnExitDelete">No</button>		
</div>

<script>
	$_init();
</script>